import Layout from '@/views/layout/Layout'
const asyncRoutes = [
  {
    path: '/system',
    component: Layout,
    name: 'System',
    meta: { title: '系统管理', icon: 'webmail' },
    children: [
      {
        path: 'user',
        name: 'User',
        component: () => import(/* webpackChunkName: 'system' */'@/views/_system/user'),
        meta: { title: '用户管理', icon: 'webmail' }
      },
      {
        path: 'roles',
        name: 'Roles',
        component: () => import(/* webpackChunkName: 'system' */'@/views/_system/role'),
        meta: { title: '角色管理', icon: 'webmail' }
      },
      {
        path: 'menu',
        name: 'Menu',
        component: () => import(/* webpackChunkName: 'system' */'@/views/_system/menu'),
        meta: { title: '菜单管理', icon: 'webmail' }
      },
      {
        path: 'dept',
        name: 'Dept',
        component: () => import(/* webpackChunkName: 'system' */'@/views/_system/dept'),
        meta: { title: '部门管理', icon: 'webmail' }
      },
      {
        path: 'job',
        name: 'Job',
        component: () => import(/* webpackChunkName: 'system' */'@/views/_system/job'),
        meta: { title: '岗位管理', icon: 'webmail' }
      },
      {
        path: 'dict',
        name: 'Dict',
        component: () => import(/* webpackChunkName: 'system' */'@/views/_system/dict'),
        meta: { title: '字典管理', icon: 'webmail' }
      }
    ]
  },
  {
    path: '/monitor',
    component: Layout,
    name: 'Monitor',
    meta: { title: '系统监控', icon: 'webmail' },
    children: [
      {
        path: 'online',
        name: 'OnlineUser',
        component: () => import(/* webpackChunkName: 'monitor' */'@/views/monitor/online'),
        meta: { title: '在线用户', icon: 'webmail' }
      },
      {
        path: 'logs',
        name: 'Log',
        component: () => import(/* webpackChunkName: 'monitor' */'@/views/monitor/logs'),
        meta: { title: '操作日志', icon: 'webmail' }
      },
      {
        path: 'errorLog',
        name: 'ErrorLog',
        component: () => import(/* webpackChunkName: 'monitor' */'@/views/monitor/errorLog'),
        meta: { title: '异常日志', icon: 'webmail' }
      }
    ]
  },
  {
    path: '/sys-tools',
    component: Layout,
    name: 'Sys-tools',
    meta: { title: '系统工具', icon: 'webmail' },
    children: [
      {
        path: 'email',
        name: 'Email',
        component: () => import(/* webpackChunkName: 'systool' */'@/views/sys-tool/email'),
        meta: { title: '邮件工具', icon: 'webmail' }
      },
      {
        path: 'swagger2',
        name: 'Swagger',
        component: () => import(/* webpackChunkName: 'systool' */'@/views/sys-tool/swagger2'),
        meta: { title: '接口文档', icon: 'webmail' }
      }
    ]
  }
]

export default asyncRoutes
